package com.top.application.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.top.application.dao.OauthTokenEntityMapper;
import com.top.application.entity.OauthTokenEntity;
import com.top.application.service.OauthTokenService;

/**
 * 
 * @ClassName: OauthServiceImpl 
 * @Description: TODO(权限认证记录信息) 
 * @author zhaiey
 * @date 2018年4月8日 下午2:25:39 
 *
 */
@Service
public class OauthServiceImpl implements OauthTokenService{
	
	@Autowired
	private OauthTokenEntityMapper oauthTokenEntityMapper;
	
	@Override
	public int delete(Integer id) {
		return oauthTokenEntityMapper.delete(id);
	}

	@Override
	public int insert(OauthTokenEntity record) {
		return oauthTokenEntityMapper.insert(record);
	}

	@Override
	public OauthTokenEntity selectById(Integer id) {
		return oauthTokenEntityMapper.selectById(id);
	}

	@Override
	public int update(OauthTokenEntity record) {
		return oauthTokenEntityMapper.update(record);
	}

	@Override
	public int deleteByUserId(Integer userId) {
		return oauthTokenEntityMapper.deleteByUserId(userId);
	}

	@Override
	public OauthTokenEntity selectByMap(Map<String, Object> param) {
		return oauthTokenEntityMapper.selectByMap(param);
	}

	@Override
	public OauthTokenEntity resentRefreshToken(String refreshToken) {
		return oauthTokenEntityMapper.resentRefreshToken(refreshToken);
	}

	@Override
	public int deleteBySecurityId(Integer securityId) {
		return oauthTokenEntityMapper.deleteBySecurityId(securityId);
	}

}
